const TOKEN = 'webapp-token'

export const setToken = (tokenObj) => {
  window.localStorage.setItem(TOKEN, JSON.stringify(tokenObj))
}

export const getToken = () => JSON.parse(window.localStorage.getItem(TOKEN)) || {}

export const removeToken = () => { window.localStorage.removeItem(TOKEN) }
